<?php
namespace app\index\controller;

use app\common\lib\ali\Sms;

class Index
{
    public function index()
    {
        return '';
    }

    public function hello($name = 'ThinkPHP5')
    {
        echo 'hello,test-nice' . $name . time();
    }

    public function singwa()
    {
        echo time();
    }

    public function sms()
    {
        $phone = "15907146375";
        $code = rand(1000, 9999);

        $rs = Sms::sendSms($phone, $code);
        var_dump($rs);
    }

    public function test()
    {
        ob_start();
        for($i=0;$i<6;$i++){
            echo "<br />........." . $i;
            ob_flush();
            flush();
            sleep(1);
        }
        ob_end_flush();
    }
}
